
if exists(select name from sysobjects where name = 'sp_TinGetByLoaiTinId')
	drop proc sp_TinGetByLoaiTinId
go
/*
	Created by: Phuoc NH
	Created on: 04/012/2013 (dd/mm/yyyy)
	Description: 
	--

	File:$sql-scripts/Proc.sp_TinGetByLoaiTinId.sql
*/

create proc sp_TinGetByLoaiTinId
@LoaiTinId int
as
begin
	select top 10 tinid, TieuDe, NoiDung, LoaiTinid, ThuTu, CONVERT(varchar(10), NgayTao,103) as ngaytao from Tin where LoaiTinId=@LoaiTinId and TrangThai!=255
end

